package com.jensen.controller;

import com.jensen.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by Jensen on 2016/10/8.
 */
@RestController
public class WebController {

    @Autowired
    private UserService userService;

    @RequestMapping("/test1")
    public String test1(){
        userService.test1();
        return "success";
    }

    @RequestMapping("/test2")
    public String test2(){
        this.userService.test2();
        return "success";
    }

    @RequestMapping(value = "/test3",produces = "application/json;charset=UTF-8")
    public Object test3(){
        this.userService.test3();
        return "success";
    }
}
